You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TMtxVec Class > TMtxVec Methods > Rem Method > TMtxVec.Rem Method ([In] TMtxVec, [In] TMtxVec)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TMtxVec.Rem Method ([In] TMtxVec, [In] TMtxVec)

The Reminder after division X/Y.

Syntax
C#
Visual Basic
public TMtxVec Rem([In] TMtxVec X, [In] TMtxVec Y);

Calculates reminder after division according to formula: 

x[i]-y[i]*Trunc(x[i]/y[i]). 

The results will be saved to the calling vector. X and Y must be a real and have the same length. Size and Complex properties of the calling vector are set implicitly to match the X object.

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TVec a,b,c; MtxVec.CreateIt(out a, out b, out c); try { a.SetIt(false, new double[] {0,1,10,-1,-10}); // a = [0, 1, 10, -1, -10]; b.SetIt(false,new double[],{0,1,System.Math.PI,-1,-System.Math.PI}); // b = [0, 1, Pi, -1, -Pi]; c.Rem(a,b); // c = [0, 0, 0.5752, 0, -0.5752] } finally { MtxVec.FreeIt(ref a,ref b,ref c); } } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!